package sing.core.ext.view

import android.graphics.drawable.Drawable
import androidx.core.graphics.drawable.DrawableCompat

/**
 * Drawable 颜色转化类
 */
fun Drawable.tintDrawable(color: Int): Drawable {
    val wrappedDrawable: Drawable = DrawableCompat.wrap(this)
    DrawableCompat.setTint(wrappedDrawable, color)
    return wrappedDrawable
}



